package com.example.psychologicalappointmentsystem.Enum;

/**
 * ClassName chatMessageType
 * Description TODO
 * Date 2025/2/14 18:19
 * Version 1.0
 */
public enum ChatMessageType {

    SENT("SENT", "0", "已发送"),
    READ("READ", "1", "已读"),
    ;

    private String name;
    private String value;
    private String remark;

    ChatMessageType(String name, String value, String remark) {
        this.name = name;
        this.value = value;
        this.remark = remark;
    }

    public String getRemark() {
        return remark;
    }
    // 添加一个静态方法用于通过描述查找枚举实例
    public static ChatMessageType fromDescription(String description) {
        for (ChatMessageType chatMessageType : values()) {
            if (chatMessageType.equals(description)) {
                return chatMessageType;
            }
        }
        throw new IllegalArgumentException("No enum constant with description: " + description);
    }
}
